home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / CIIGSIncludes / Memory.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-03  |  3.7 KB  |  90 lines  |  [TEXT/MPS ]

  1. /********************************************
  2. ; File: Memory.h
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc.1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************/
  9. #ifndef __TYPES__
  10. #include <TYPES.h>
  11. #endif
  12.  
  13. #ifndef __MISCTOOL__
  14. #include <MISCTOOL.h>
  15. #endif
  16.  
  17. #ifndef __MEMORY__
  18. #define __MEMORY__
  19.  
  20.  
  21. /* These are standard memory calls */
  22. char *memccpy(); 
  23. char *memchr(); 
  24. int  memcmp(); 
  25. char *memcpy(); 
  26. char *memset(); 
  27.  
  28.  
  29.  
  30. /* Error Codes */
  31. #define memErr 0x0201  /* unable to allocate block */
  32. #define emptyErr 0x0202  /* illegal operation, empty handle */
  33. #define notEmptyErr 0x0203  /* an empty handle was expected for this operation */
  34. #define lockErr 0x0204  /* illegal operation on a locked block */
  35. #define purgeErr 0x0205  /* attempt to purge an unpurgable block */
  36. #define handleErr 0x0206  /* an invalid handle was given */
  37. #define idErr 0x0207  /* an invalid owner ID was given */
  38. #define attrErr 0x0208  /* operation illegal on block with given attributes */
  39.  
  40. /* Handle Attribute Bits */
  41. #define attrNoPurge 0x0000  /* Not purgeable */
  42. #define attrBank 0x0001  /* fixed bank */
  43. #define attrAddr 0x0002  /* fixed address */
  44. #define attrPage 0x0004  /* page aligned */
  45. #define attrNoSpec 0x0008  /* may not use special memory */
  46. #define attrNoCross 0x0010  /* may not cross banks */
  47. #define attrPurge1 0x0100  /* Purge level 1 */
  48. #define attrPurge2 0x0200  /* Purge level 2 */
  49. #define attrPurge3 0x0300  /* Purge level 3 */
  50. #define attrPurge 0x0300  /* test or set both purge bits */
  51. #define attrHandle 0x1000  /* block of master pointers */
  52. #define attrSystem 0x2000  /* system handle */
  53. #define attrFixed 0x4000  /* not movable */
  54. #define attrLocked 0x8000  /* locked */
  55. extern pascal void AddToOOMQueue() inline(0x0C02,dispatcher);
  56. extern pascal void BlockMove() inline(0x2B02,dispatcher);
  57. extern pascal void CheckHandle() inline(0x1E02,dispatcher);
  58. extern pascal void CompactMem() inline(0x1F02,dispatcher);
  59. extern pascal void DisposeAll() inline(0x1102,dispatcher);
  60. extern pascal void DisposeHandle() inline(0x1002,dispatcher);
  61. extern pascal Handle FindHandle() inline(0x1A02,dispatcher);
  62. extern pascal LongWord FreeMem() inline(0x1B02,dispatcher);
  63. extern pascal LongWord GetHandleSize() inline(0x1802,dispatcher);
  64. extern pascal void HandToHand() inline(0x2A02,dispatcher);
  65. extern pascal void HandToPtr() inline(0x2902,dispatcher);
  66. extern pascal void HLock() inline(0x2002,dispatcher);
  67. extern pascal void HLockAll() inline(0x2102,dispatcher);
  68. extern pascal void HUnlock() inline(0x2202,dispatcher);
  69. extern pascal void HUnlockAll() inline(0x2302,dispatcher);
  70. extern pascal LongWord MaxBlock() inline(0x1C02,dispatcher);
  71. extern pascal void MMBootInit() inline(0x0102,dispatcher);
  72. extern pascal void MMReset() inline(0x0502,dispatcher);
  73. extern pascal void MMShutDown() inline(0x0302,dispatcher);
  74. extern pascal Word MMStartUp() inline(0x0202,dispatcher);
  75. extern pascal Boolean MMStatus() inline(0x0602,dispatcher);
  76. extern pascal Word MMVersion() inline(0x0402,dispatcher);
  77. extern pascal Handle NewHandle() inline(0x0902,dispatcher);
  78. extern pascal void PtrToHand() inline(0x2802,dispatcher);
  79. extern pascal void PurgeAll() inline(0x1302,dispatcher);
  80. extern pascal void PurgeHandle() inline(0x1202,dispatcher);
  81. extern pascal LongWord RealFreeMem() inline(0x2F02,dispatcher);
  82. extern pascal void ReAllocHandle() inline(0x0A02,dispatcher);
  83. extern pascal void RemoveFromOOMQueue() inline(0x0D02,dispatcher);
  84. extern pascal void RestoreHandle() inline(0x0B02,dispatcher);
  85. extern pascal void SetHandleSize() inline(0x1902,dispatcher);
  86. extern pascal void SetPurge() inline(0x2402,dispatcher);
  87. extern pascal void SetPurgeAll() inline(0x2502,dispatcher);
  88. extern pascal LongWord TotalMem() inline(0x1D02,dispatcher);
  89. #endif
  90.